The present invention relates to a rate detection method and a rate detector.
Engine control generally includes sensing the current state of the engine crankshaft (e.g., crankshaft position or crankshaft velocity). Many engine control systems using digital signal processors (DSPs) require acquisition of information from a digital transducer. The information from a transducer such an encoder is in the form of a digital pulse stream and represents the position of the mechanism under control. The frequency of this pulse stream is dictated by the speed of the mechanism under control (as measured by the transducer).
The frequency range of this position pulse stream from the transducer can be very large. In many engine control applications, it is necessary to measure crankshaft velocity information so that digital control algorithms, such as a control algorithm for in-cylinder air mass calculation, can use the information to compute the required control functions. However, currently available technique is not satisfactory in providing the velocity information using the position pulse stream when the engine operates in an operating region of very low engine speeds and/or in an operating region where the engine is about to stall.
Hence, a technique that allows for the compensation for such insufficiency of the currently available technique is highly desirable.
An object of the present invention is to provide a rate detection method and/or a rate detector, which allow for the compensation for the above-mentioned insufficiency of currently available technique of processing an input stream of asynchronous pulses dictated by the speed of mechanism under control.
One of exemplary embodiments according to the present invention provides timer handling in timed with asynchronous digital data acquisition plus periodic sampling of the timer value and the acquired data for analysis and output.
Another of such exemplary embodiments according to the present invention provides asynchronous digital data acquisition of two different digital data, and periodic sampling of selected one of the two different digital data for analysis and output.
According to one alternative aspect of the present invention, there is provided a rate detection method, comprising:
generating interrupts in response to an input stream;
storing first timer values of a first timer in response to said interrupts;
setting a second timer to run from zero in response to said interrupts;
sampling said stored first timer values to determine a first rate related to said input stream;
sampling second timer value of said second timer to determine a second rate; and
creating a final rate related to said input stream based on said first and second stream.
According to another alternative aspect of the present invention, there is provided a rate detection method, comprising:
generating first interrupts in response to a first input stream;
generating second interrupts in response to a second input stream;
storing first timer values in response to said first interrupts;
storing second timer values in response to said second interrupts;
executing a first routine, when selected, which includes sampling said stored first timer values to determine a first rate related to said first input stream as a final rotation rate;
executing a second routine, when selected, which includes sampling said stored second timer values to determine a second rate related to said second input stream as said final rotation rate; and
selecting one of said first and second routines.
According to still another alternative aspect of the present invention, there is provided a rate detector for a rotation device, comprising:
a source outputting a stream of pulses related to rotation rate of a rotation device; and
a programmable signal processor with interrupt input coupled to output of said source, said signal processor being programmed to
store first timer values of a first timer in response to said interrupts;
set a second timer to run from zero in response to said interrupts;
sample said stored first timer values to determine a first rate related to said input stream;
sample second timer value of said second timer to determine a second rate; and
create a final rate related to said input stream based on said first and second rates.
According to a further alternative aspect of the present invention, there is provided a rate detector for a rotation device, comprising:
a source outputting a stream of first pulses related to rotation rate of a rotation device;
a rotation sensor coupled to said rotation device, said rotation sensor outputting a stream of second pulses related to rotation rate of said rotation device;
a programmable signal processor with first interrupt input coupled to output of said source and also with second interrupt input coupled to output of said rotation sensor, said signal processor being programmed to:
store first timer values in response to said first interrupts;
store second timer values in response to said second interrupts;
execute a first routine, when selected, which includes sampling said stored first timer values to determine a first rate related to said first input stream as a final rotation rate;
execute a second routine, when selected, which includes sampling said stored second timer values to determine a second rate related to said second input stream as said final rotation rate; and
select one of said first and second routines.